#include <iostream>
using namespace std;

class Shape
{
protected:
	int w, h;
public:
	Shape(int w, int h) :w(w), h(h) {}
};

/*实现两个派生类*/
class Rectangle : public Shape
{
public:
	Rectangle(int w, int h) :Shape(w, h) {};
	double area();
};

class Triangle : public Shape
{
public:
	Triangle(int w, int h) :Shape(w, h) {};
	double area();
};

double Rectangle::area() {
	return (double)w * (double)h;
}

double Triangle::area() {
	return (double)w * (double)h * 0.5;
}

int main()
{
	int w, h;
	cin >> w >> h;
	Rectangle a(w, h);
	cout << a.area() << endl;
	cin >> w >> h;
	Triangle b(w, h);
	cout << b.area() << endl;
	return 0;
}